import { createBrowserRouter } from "react-router-dom";
import { lazy } from "react";

const Center = lazy(() => import("../view/Center/Center.tsx"));
const Custom = lazy(() => import("../view/Custom/Custom.tsx"));
const Home = lazy(() => import("../view/Home/Home.tsx"));
const TicketList = lazy(() => import("../view/TicketList/TicketList.tsx"));
const CitySelect = lazy(() => import("../view/CitySelect/CitySelect.tsx"));

const router = createBrowserRouter([
  {
    path: "/",
    element: <Home />,
  },
  {
    path: "/Center",
    element: <Center />,
  },
  {
    path: "/Custom",
    element: <Custom />,
  },
  {
    path: "/TicketList",
    element: <TicketList />,
  },
  {
    path: "/CitySelect",
    element: <CitySelect />,
  },
  {
    path: "*",
    element: <h2>404 Not Found</h2>,
  },
]);

export default router;
